home *** CD-ROM | disk | FTP | other *** search
/ QuickTime for the Web (2nd Edition) / QuickTime for the Web (2nd Edition).iso / pc / Demos / Mac / Matthew's Behaviors / KeyboardEventƒ / ControKeys < prev    next >
Encoding:
INI File  |  2001-09-10  |  796 b   |  35 lines

  1. [Name]
  2. ControlKeys - Use with KeyboardEvent
  3. By Matthew Peterson, matthew@pinoko.berkeley.edu
  4.  
  5. [Description]
  6. 2-19-2000
  7. Adds polling for control keys, such as:
  8. Tab = 9
  9. arrows, up = 200, right = 201, down = 202, left = 203
  10. Return = 13
  11. delete = 8
  12. Feel free to add more keys to this behavior if needed.
  13.  
  14. [Parameters]
  15.  
  16. [200072 MP_KBControl]
  17. GlobalVars whichkeyN whichkeyC IsCap
  18. //Use with KeyboardEvent Behavior.
  19. //Contorl keys
  20. IF(KeyIsDown(kNone,kTabKey))
  21.     whichkeyN = 9
  22. ELSEIF(KeyIsDown(kNone,kDeleteKey))
  23.     whichkeyN = 8
  24. ELSEIF(KeyIsDown(kNone,kUpArrowKey))
  25.     whichkeyN = 200
  26. ELSEIF(KeyIsDown(kNone,kRightArrowKey))
  27.     whichkeyN = 201
  28. ELSEIF(KeyIsDown(kNone,kDownArrowKey))
  29.     whichkeyN = 52
  30. ELSEIF(KeyIsDown(kNone,kLeftArrowKey))
  31.     whichkeyN = 53
  32. ELSEIF(KeyIsDown(kNone,kReturnKey))
  33.     whichkeyN = 13
  34. ENDIF
  35.